<?php
/**
 * Created by litong on Date: 2019/3/25 0025 上午 9:45
 */

namespace Home\Controller;

use Think\Controller;

class UserController extends Controller {
  public function indexAction() {
    //$this->redirect("edit",'',3,"重定向");
    //$this->success('成功',U('user/login'),3);
    //$this->error('错误',U('user/login'),3);
    //$this->input();
    $user = I("get.user");
    echo $user;
  }


  public function editAction() {
    echo __FUNCTION__ . "<br/>";
  }

  public function loginAction() {
    echo __FUNCTION__ . "<br/>";
  }

  public function ajax() {
    $array = array(
      'name' => "litong",
      'age' => "20",
    );
    $this->ajaxReturn($array, 'XML');
  }

  public function input() {
//    $i = I("server.");
    $i = I("server.HTTP_HOST");
    dump($i);
  }
}